<style>
.new-lay-span{
    display: inline-block;
    width: 45%!important;
    line-height: 3rem;
}
</style>





<div class="x-body">
    <h3>基本信息</h3>
    <hr>

        <div class="layui-form-item">
            <span class="layui-input-inline new-lay-span"> 商店 ：{$info.shop->shop_name}</span>
            <span class="layui-input-inline new-lay-span"> 币种 ：{$info.wallet.name}</span>

        </div>
        <div class="layui-form-item">

            <span class=" new-lay-span"> 订单号 ：{$info.serial_number}</span>
            <span class="layui-input-inline new-lay-span"> 创建时间 ：{$info.create_time}</span>
        </div>
        <div class="layui-form-item">
            <span class="layui-input-inline new-lay-span"> 订单数量 ：{$info.number}</span>
            <span class="layui-input-inline new-lay-span"> 订单单价 ：{$info.price}</span>

        </div>


        <div class="layui-form-item">
            <span class="layui-input-inline new-lay-span"> 订单总价 ：{$info.total}</span>
            {if condition ="$info.order_id gt 0"}   <span class="layui-input-inline new-lay-span"> 原转移订单号 ：<a href="{:url('trade_order_detail', array('id' => $info['order_id']))}" style="color: #0a8cd2">{$info.contractorder.serial_number}</a></span>{/if}

        </div>


        <hr>


        <div class="layui-form-item">
            <label for="logo" class="layui-form-label">
                <span class="x-red">*</span>打款截图（165*128）
            </label>
            <div id="logo" class="layui-input-block">
                {assign name="cover_id" value="$info.cover_id|default='0'" /}
                {:widget('file/index', ['name' => 'cover_id', 'value' => $cover_id, 'type' => 'img'])}
            </div>
            <!--<div class="layui-form-mid layui-word-aux">-->
            <!--(请上传单张封面图片)-->
            <!--</div>-->
        </div>
        <input type="hidden" name="id" value="{$info['id']|default='0'}"/>
        <button type="button"  class="layui-btn ladda-button" data-style="slide-up"  onclick="save()">
            确 定
        </button>
        <a class="layui-btn ladda-button" onclick="javascript:cancel();return false;"><i class="fa fa-history"></i> 取 消</a>



</div>

<script>
    layui.use('laydate', function(){
        layer=layui.layer;
        //执行一个laydate实例
    });
    function save(){
        var id=$("[name='id']").val();
        var cover_id=$("[name='cover_id']").val();
        $.post("{:url('trade_order_detail')}",{id:id,cover_id:cover_id,update:1,state:3},function (d) {
            if(d.code==1){
                var index = parent.layer.getFrameIndex(window.name);
                parent.layer.close(index);//关闭当
                parent.location.reload();
            }else{
                layer.msg(d.msg);
            }
        })
    }

    function cancel() {

        var index = parent.layer.getFrameIndex(window.name);
        parent.layer.close(index);//关闭当
    }
</script>
